<template>
	<div class="dashboard-container">
		{{ info }}
		<el-button v-waves type="primary" @click="test">Test</el-button>
		<Authority :roles="['ROLE_ADMIN']">
			<el-button v-waves type="primary">ROLE_ADMIN</el-button>
		</Authority>
		<Authority :roles="['ROLE_GUEST']">
			<el-button v-waves type="primary">ROLE_GUEST</el-button>
		</Authority>
		<Authority :roles="['ROLE_TEST']">
			<el-button v-waves type="primary">ROLE_TEST</el-button>
		</Authority>
	</div>
</template>

<script>
	import { mapGetters } from 'vuex';
	import { accountService } from '@/services/security/Account';

	export default {
		name: 'Dashboard',
		data() {
			return {
				currentRole: 'adminDashboard'
			};
		},
		computed: {
			...mapGetters(['info'])
		},
		methods: {
			test() {
				accountService.information().then(info => {
					console.log(info);
				});
			}
		}
	};
</script>
